<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/common/include.jsp"%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript">
	function invokeMyRight(uId){
		location='<s:url namespace="/user" action="grantMyRight" method="invokeMyRight" includeParams="false"/>?roleId=<s:property value="role.id"/>&user.id='+uId;
	}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>下放我的权限</title>
</head>
<body>
<div class="tleft"></div>
<div class="tright"></div>
<div class="tbg">下放我的权限(<s:property value='role.name'/>)</div>

	<table cellpadding="1" cellspacing="1"  class="tablelist">
		<tr>
		<td class="toptitle">账户名</td>
		<td class="toptitle">所拥有的权限</td>
		
		<td class="toptitle">操作</td>
	</tr>
		<s:iterator value="users">
						<tr>
						<td class="tableHeader2">
							<s:property value="name"/>
						</td>
						<td class="tableHeader3">	
							<s:if test="canUse == true">可用</s:if>
							<s:else>不可用</s:else>
							<s:if test="canGrant == true">
							  可分配
							</s:if>
							<s:else>不可分配</s:else>
						</td>
						<td class="tableHeader3">
							<a href="javascript:invokeMyRight('<s:property value='id'/>');">收回权限</a>
						</td>
						</tr>	
				</s:iterator>
	
	<s:form action="grantMyRight!input.action" namespace="/user">
	<div class="tableHeader4">
		<s:hidden name="roleId" value="%{roleId}"></s:hidden>
		<s:submit cssClass="btn_Text2" value="下放" ></s:submit>
    </div>	
    </s:form>
</body>
</html>